<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<TITLE>今日日志</TITLE>
<LINK href="<%=basePath%>/css/top.css" type=text/css rel=stylesheet>
<LINK href="<%=basePath%>/css/popcalendar.css" type=text/css
	rel=stylesheet>
<LINK href="<%=basePath%>/css/main.css" type="text/css" rel="stylesheet">
<SCRIPT src="<%=basePath%>/js/popcalendar.js"></SCRIPT>
<SCRIPT src="<%=basePath%>/js/My97DatePicker/WdatePicker.js"></SCRIPT>

<SCRIPT src="<%=basePath%>/js/function.js"></SCRIPT>

<SCRIPT language=JavaScript>
function CheckForm()
{
   if(document.Form1.txtAddDate.value == "")
   {
	 alert("日期不能为空！");
	 document.Form1.txtAddDate.focus();
	 return (false);
   }
   
   if(!checkIsDate(document.Form1.txtAddDate.value))
   {
	 alert("日期不正确！");
	 document.Form1.txtAddDate.focus();
	 return (false);
   }
   
   if(checkDateEarlier(document.Form1.txtAddDate.value, '1900-1-1'))
   {
	alert("日期在锁定范围！");
	return (false);
   }
   
   var oEditor = FCKeditorAPI.GetInstance('txtContent');
   if(oEditor.GetHTML() == "")
   { alert("日志内容不能为空！");
     return (false);
   }
   return (true);
}

function CheckFile()
{
   if (document.Form1.fileAttach.value=="")
   { alert("请选择附件！");
     return (false);
   }   
   return true;	
}  
   
			</SCRIPT>

<META content="MSHTML 6.00.6000.21089" name=GENERATOR>
</HEAD>
<BODY topMargin=5>
<FORM id=Form1 name=Form1 action="LogServlet" method="post">
<DIV><INPUT id=__VIEWSTATE type="hidden" value="add" name="log">
</DIV>
<DIV id=pnlMain>
<TABLE class=small cellSpacing=0 cellPadding=3 width="100%" border=0>
	<TBODY>
		<TR>
			<TD class=Big><IMG height=18
				src="<%=basePath%>/img/office/diary.gif" width=18 align=absMiddle><SPAN
				class=big3> 新建日志</SPAN></TD>
		</TR>
	</TBODY>
</TABLE>
<TABLE class=small cellSpacing=1 cellPadding=2 align=center
	bgColor=#000000 border=0>
	<TBODY>
		<TR>
			<TD class=TableData noWrap>日志类型：</TD>
			<TD class=TableData><SELECT class=BigSelect id=selectType
				name=selectType>
				<OPTION value="所有" selected>所有</OPTION>
				<OPTION value="工作日志">工作日志</OPTION>
				<OPTION value="个人日志">个人日志</OPTION>
			</SELECT></TD>
		</TR>
		<TR>
			<TD class=TableData noWrap>日期：</TD>
			<TD class=TableData><INPUT class=BigInput id=txtAddDate
				maxLength=10 size=10 name=txtAddDate onclick="WdatePicker()">
			</TD>
		</TR>
		<tr>
			<TD class=TableData noWrap>日志标题：</TD>
			<TD class=TableData><INPUT class=BigInput id=txtMobile
				maxLength=50 size=25 name=txtMobile></TD>
		</tr>

		<TR>
			<TD class=TableData colSpan=2>
			<DIV><INPUT id=txtContent type=hidden name=txtContent>
			内容： </br>
			<TEXTAREA class=BigInput id=txtNote name=txtNote rows=5 wrap=on
				cols=60></TEXTAREA></DIV>
			</TD>
		</TR>
		<DIV id=pnlField></DIV>
		<TR class=TableControl align=middle>
			<TD noWrap colSpan=2><INPUT class=BigButton id=btnSubmit
				onClick="return CheckForm();" type=submit value=保存 name=btnSubmit>&nbsp;&nbsp;
			<INPUT class=BigButton onClick="location='diary.aspx'" type=button
				value=返回></TD>
		</TR>
	</TBODY>
</TABLE>
</DIV>
<DIV><INPUT id=__EVENTVALIDATION type=hidden
	value=name=__EVENTVALIDATION></DIV>
</FORM>
</BODY>
</HTML>